Partial Evaluator as a Compiler for Re ective Languages

نویسندگان

  • Kenichi Asai
  • Hidehiko Masuhara
  • Satoshi Matsuoka
  • Akinori Yonezawa
چکیده

This paper presents an online partial evaluator with a mechanism to handle I/O-type side-e ects using preactions, and reports our experiment of using the partial evaluator as a compiler for the re ective language Black we are designing. Black is a Scheme-based re ective language, which allows user programs to access and modify its metalevel interpreter (or the language semantics) from within the same language framework. Because the semantics may change during computation, it is impossible to compile using a conventional Scheme compiler. To cope with this exibility, we implemented an online partial evaluator, and specialized a Scheme meta-circular interpreter with respect to a modi ed interpreter to obtain an e cient version of the modi ed interpreter. The resulting interpreter turns out to be quite e cient in that it is almost identical to the original Scheme interpreter, except that it correctly re ects the modi cation made by users. In fact, we got more: by supplying a speci c user program, we obtained a compiled program under the modi ed language semantics. ANY OTHER IDENTIFYING INFORMATION OF THIS REPORT DISTRIBUTION STATEMENT First issue 35 copies. SUPPLEMENTARY NOTES REPORT DATE December 13, 1995 TOTAL NO. OF PAGES 14 WRITTEN LANGUAGE English NO. OF REFERENCES 18 DEPARTMENT OF INFORMATION SCIENCE Faculty of Science, University of Tokyo 7-3-1 Hongo, Bunkyo-ku Tokyo, 113 Japan Partial Evaluator as a Compiler for Re ective Languages Kenichi Asai Hidehiko Masuhara Satoshi Matsuoka y Akinori Yonezawa

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Roles of a Partial Evaluator for the Re ective Language Black

A re ective language allows us to access its interpreter to dynamically modify or extend the language semantics from within the same language. In the previous paper, we implemented a re ective language called Black, and showed that a directly executable interpreter can be implemented by duplicating and partially evaluating the metalevel interpreters without losing changeability. In this paper, ...

متن کامل

Roles of a Partial Evaluator for the Re ective Language

A re ective language allows us to access its interpreter to dynamically modify or extend the language semantics from within the same language. In the previous paper, we implemented a re ective language called Black, and showed that a directly executable interpreter can be implemented by duplicating and partially evaluating the metalevel interpreters without losing changeability. In this paper, ...

متن کامل

Using Partial Evaluation in Re ective Concurrent Object - Oriented Languages

Parallel and distributed programs often have hardware/problem speci c optimizations for improving quality of the program such as e ciency and robustness. Those optimizations, unfortunately, degrade portability and re-usability as they are intertwined with the original algorithm description. Re ective languages, which provide the application programmer extensible and abstract implementation of t...

متن کامل

Compiling Away the Meta-Level in Object-Oriented Concurrent Re ective Languages Using Partial Evaluation

Meta-level programmability is bene cial for parallel/distributed object-oriented computing to improve performance, etc. The major problem, however, is interpretation overhead due to meta-circular interpretation. To solve this problem, we propose a compilation framework for object-oriented concurrent re ective languages using partial evaluation. Since traditional partial evaluators do not allow ...

متن کامل

Logimix: A Self-Applicable Partial Evaluator for Prolog

We present a self-applicable partial evaluator for a large subset of full Prolog. The partial evaluator, called Logimix, is the result of applying our experience from partial evaluation of functional languages to Prolog. Great care is taken to preserve the operational semantics of the partially evaluated programs, including the effects of non-logical predicates and side effects. At the same tim...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1995